home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Leonardo the Inventor
/
Leonardo The Inventor (93026)(Broderbund)(Riverdeep)(2004).iso
/
LEOWINMV
/
SHARED.DIR
/
03105_Script_PC PRINT LEO II
< prev
next >
Wrap
Text File
|
1996-04-01
|
4KB
|
136 lines
-- --------------------------------------------------------------------------------------
-- Handler printScreenPC prints a screenShot of the current 13" screen
-- (640 wide by 480 tall), scaled up to fit an 11 x 8.5 inch page...
-- (not recommended for monitors/windows smaller than 640 x 480 at this time):
-- If printSize is "card", it prints 4 cards on the page. Otherwise, it prints
-- on screenshot.
on printScreenPC printSize
if (printSize = "card") then
printCardSizePC
else if (printSize = "full") then
printFullSizePC
end if
end
-----------------------------------------------------------------------
-- Handler printFullSizePC
on printFullSizePC fullFileName
-- 1) open the xobject
openXObjHandler "pmatic.dll"
-- 2) create a new object
set printObj = printomatic(mnew)
if not(objectP( printObj )) then
alert "Sorry...Error in printing."
exit
end if
-- 3) call the print function to print
doPrintFullScreen(printObj, fullFileName)
-- 4) close the xojbect
closeXObjHandler "pmatic.dll"
end
-- --------------------------------------------------------------------------------------
-- Handler printFilePC
on printFilePC printSize, fullFileName
if (printSize = "card") then
printCardSizePC(fullFileName)
else if (printSize = "full") then
printFullSizePC(fullFileName)
end if
end
-- --------------------------------------------------------------------------------------
-- Handler printAllCardsPC
on printAllCardsPC filePathName
-- 1) open the xobject
openXObjHandler "pmatic.dll"
-- 2) call the printing function (this one creates and disposes)
doPrintAllCards(filePathName)
-- 3) close the xojbect
closeXObjHandler "pmatic.dll"
end
-- ----------------------------------------------------------------
-- Handler printDatabasePC is called when the user clicks the print
-- button in the database. It prints the text or picture (whichever
-- is currently displayed) of the currently selected topic.
on printDatabasePC
global textButton, pictureButton
-- 1) open the xobject
openXObjHandler "pmatic.dll"
-- 2) create a new object
set printObj = printomatic(mnew)
if not(objectP( printObj )) then
alert "Sorry...Error in printing."
exit
end if
-- 3) call the print function to print
if isActivated(textButton) then
doPrintDatabaseText(printObj)
else if isActivated(pictureButton) then
doPrintDatabasePicture(printObj)
end if
-- 4) close the xojbect
closeXObjHandler "pmatic.dll"
end
-- -----------------------------------------------------------
-- Handler printCardSizePC prints four of the current screen on a
-- landscape page.
on printCardSizePC fullFileName
-- 1) open the xobject
openXObjHandler "pmatic.dll"
-- 2) create a new object
set printObj = printomatic(mnew)
if not(objectP( printObj )) then
alert "Sorry...Error in printing."
exit
end if
-- 3) call the print function to print
doPrintCardSize(printobj, fullFileName)
-- 4) close the xojbect
closeXObjHandler "pmatic.dll"
end
-- -----------------------------------------------------------
-- Handler printPicturePC
on printPicturePC printSize, whichCast, title, caption
-- 1) open the xobject
openXObjHandler "pmatic.dll"
-- 2) create a new object
set printObj = printomatic(mnew)
if not(objectP( printObj )) then
alert "Sorry...Error in printing."
exit
end if
-- 3) call the print function to print
doPrintPicture(printObj, whichCast, title, caption)
-- 4) close the xojbect
closeXObjHandler "pmatic.dll"
end